﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;

namespace WenChao
{
    public class Global : System.Web.HttpApplication
    {

        protected void Application_Start(object sender, EventArgs e)
        {
            //LogUtil.WriteLog(Application,"Application_Start");
           // WriteLog("Application_Start")
            //Application["log"] = "Application_Start\n";
            WriteLog("Application_Start");
        }

        protected void Session_Start(object sender, EventArgs e)
        {
            //Application["log"] = "Session_Start\n";
            WriteLog("Session_Start");
        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {
            WriteLog("Application_BeginRequest");
        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {
            WriteLog("Application_AuthenticateRequest");
        }

        protected void Application_Error(object sender, EventArgs e)
        {
            WriteLog("Application_Error");
        }

        protected void Session_End(object sender, EventArgs e)
        {
            WriteLog("Session_End");
        }

        protected void Application_End(object sender, EventArgs e)
        {
            WriteLog("Application_End");
        }

        private void WriteLog(string log)
        {
            LogUtil.WriteLog(Application, log);
        }
    }
}